<?php
/**
 * @author Zwc
 * Created On 2021/5/3 16:05
 */

namespace app\auth\controller;


use app\auth\service\AreaService;
use app\common\controller\AdminBaseController;
use think\App;

class Area extends AdminBaseController
{
    protected $service;
    public function __construct(App $app)
    {
        parent::__construct($app);
        $this->service = new AreaService();
    }

    public function index() {
        $params = $this->request->get();
        $pcode = isset($params['pcode']) ? $params['pcode'] : 0;
        return view('index',[
            'pcode' => $pcode
        ]);
    }

    public function getData() {
        $params = $this->request->get();
        $data = $this->service->getData($params);
        return ['code' => 0,'msg' => '获取数据成功','data' => $data];
    }

}